"""050_modify_ddl.py

Revision ID: 2785e54dc1c4
Revises: b58a71ca6ae3
Create Date: 2025-11-06 13:43:50.820328

"""
from alembic import op
import sqlalchemy as sa
import sqlmodel.sql.sqltypes
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = '2785e54dc1c4'
down_revision = 'b58a71ca6ae3'
branch_labels = None
depends_on = None

sql='''
UPDATE data_training SET enabled = true;
UPDATE terminology SET enabled = true;
'''

def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('data_training', sa.Column('enabled', sa.Boolean(), nullable=True))
    op.add_column('terminology', sa.Column('enabled', sa.Boolean(), nullable=True))

    op.execute(sql)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('terminology', 'enabled')
    op.drop_column('data_training', 'enabled')
    # ### end Alembic commands ###
